package com.yaowk.web.system.exception;

import com.yaowk.api.system.exception.SystemException;
import com.yaowk.web.common.model.Result;
import com.yaowk.web.common.utils.ResultUtils;
import org.springframework.web.bind.annotation.*;

@ControllerAdvice(annotations = RestController.class)
@ResponseBody
public class SystemExceptionAdvice {

    @ExceptionHandler(SystemException.class)
    public Result systemException(SystemException e) {
        return ResultUtils.result(Result.Code.FAIL.getValue(), e.getMessage());
    }


}
